#include <jni.h>
#include <utils/Log.h>
#include  "InputSystem.h"

/*
 * Class:     com_zitop_udpvideoserver_jni_AnalogInput
 * Method:    sendSingleButton
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_com_xiaoliuzhi_android_uinput_jni_AnalogInput_sendSingleButton
  (JNIEnv *env, jclass jobject,jint kval)
{
	send_single_button_events(kval);

}

/*
 * Class:     com_zitop_udpvideoserver_jni_AnalogInput
 * Method:    sendMouseMoveRel
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_com_xiaoliuzhi_android_uinput_jni_AnalogInput_sendMouseMoveRel
  (JNIEnv *env, jclass jobject,jint xval,jint yval,jint factor)
{

	send_mouse_events_x_y_rel(xval,yval,factor);


}


/*
* Class:     com_zitop_udpvideoserver_jni_AnalogInput
* Method:    sendMouseMoveAbs
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_com_xiaoliuzhi_android_uinput_jni_AnalogInput_sendMouseMoveAbs
(JNIEnv *env, jclass jobject, jfloat xval, jfloat yval, jint factor)
{

	send_mouse_move_x_y_abs(xval, yval, factor);

}

/*
 * Class:     com_zitop_udpvideoserver_jni_AnalogInput
 * Method:    sendSingleTouch
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_com_xiaoliuzhi_android_uinput_jni_AnalogInput_sendSingleTouch
  (JNIEnv *env, jclass jobject,jint xval,jint yval)
{

	send_single_touch_x_y_abs(xval,yval);


}

/*
 * Class:     com_zitop_udpvideoserver_jni_AnalogInput
 * Method:    sendTounchMove
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_com_xiaoliuzhi_android_uinput_jni_AnalogInput_sendSync
  (JNIEnv *env, jclass jobject,jint xval,jint yval)
{
	send_sync_abs();
}

/*
 * Class:     com_zitop_udpvideoserver_jni_AnalogInput
 * Method:    sendButtonSet
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_com_xiaoliuzhi_android_uinput_jni_AnalogInput_sendButtonSet
  (JNIEnv *env, jclass jobject,jint code,jint value)
{

	send_event_button(code,value);

}

/*
 * Class:     com_zitop_udpvideoserver_jni_AnalogInput
 * Method:    sendMouseWheel
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_com_xiaoliuzhi_android_uinput_jni_AnalogInput_sendMouseWheel
  (JNIEnv *env, jclass jobject,jint value)
{

	send_mouse_wheel(value);

}



/*
 * Class:     com_zitop_udpvideoserver_jni_AnalogInput
 * Method:    openUinputDevice
 * Signature: ()I
 */
JNIEXPORT jint JNICALL Java_com_xiaoliuzhi_android_uinput_jni_AnalogInput_setupUinputDevice
(JNIEnv *env, jclass jobject,jint width,jint height)
{
	return setup_uinput_device(width,height);
}

/*
 * Class:     com_zitop_udpvideoserver_jni_AnalogInput
 * Method:    colseUinputDevice
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_com_xiaoliuzhi_android_uinput_jni_AnalogInput_colseUinputDevice
(JNIEnv *env, jclass jobject)
{
	colse_device();
}
